package com.atcc.demo.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.atcc.demo.domain.UserToken;
import com.atcc.demo.mapper.UserTokenMapper;

@Service
public class UserTokenServiceImpl implements UserTokenService{
    
	@Autowired
	UserTokenMapper userTokenMapper;
	
	@Override
	public List<UserToken> getAll() {
		return userTokenMapper.getAll();
	}

	@Override
	public int addUserToken(UserToken userToken) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateUserTokenByPhoneNumberAndDefaultPhone(UserToken userToken) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteUserTokenByPhoneNumberAndDefaultPhone(String phoneNumber, Boolean defaultPhone) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public UserToken getUserTokenByTokenCode(String tokenCode) {
		return userTokenMapper.insert(tokenCode);
	}

	@Override
	public UserToken getUserTokenByPhoneNumberAndDefaultPhone(String phoneNumber, Boolean defaultPhone) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void deleteUserTokenByTokenCode(String token) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void deleteUserTokenByPhoneNumber(String phonenumber) {
		// TODO Auto-generated method stub
		
	}

}
